home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_pow_revive.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
73 lines
# Jedi Knight Cog Script
#
# POW_REVIVE.COG
#
# POWERUP Script - Revive
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
sound pickupsnd=helthpu1.wav local
sound respawnsnd=Activate01.wav local
flex amount local
message touched
message taken
message respawn
end
# ========================================================================================
code
touched:
player = GetSourceRef();
amount = GetInv(player, 60);
if ((amount < GetInvMax(player, 60)) || (GetThingHealth(player) < 100))
{
TakeItem(GetSenderRef(), -1);
call taken;
}
Return;
# ........................................................................................
taken:
player = GetSourceRef();
powerup = GetSenderRef();
// Print("Revive");
jkPrintUNIString(player, 66);
// Do effects.
PlaySoundLocal(pickupsnd, 1, 0, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
// Max Health.
SetThingHealth(player, 100);
// Max Shield
SetInv(player, 60, GetInvMax(player, 60));
Return;
# ........................................................................................
respawn:
PlaySoundThingLocal(respawnsnd, GetSenderRef(), 0.6, 5.0, 10.0, 0);
Return;
end